home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / basic / ynqfra.exe / YNQFRA.BAS < prev   
Encoding:
BASIC Source File  |  1992-01-03  |  19.8 KB  |  597 lines

  1. DEFINT A-Z
  2. DECLARE SUB YNQvertical (dLine, dCol, decision$)
  3. DECLARE SUB YNQhorizontal (dLine, dCol, decision$)
  4.  
  5. '  Shareware :  If you find it useful, register it for $10, I'll keep you
  6. '  posted on additions and improvements and keep you up to date on exciting
  7. '  developments in the explosive shareware field.
  8. '
  9. '  Your registration encourages the concept of computer software you
  10. '  can 'try' before you 'buy.'
  11. '
  12.  
  13. '  ██████████████
  14. '  █┌───────────────┐
  15. '  █│  YNQfra.bas   │█           '  gets a yes, no or quit decision from
  16. '   └───────────────┘█           '  the operator...choose either a hori-
  17. '      ███████████████           '  zontal or vertical presentation.
  18.                                  '
  19.                                  '  Interesting 3D effect in an entirely
  20.                                  '  text based screen mode.
  21.                                  '
  22.                                  '  Several other grid types are included
  23.                                  '  in the source code if you prefer a
  24.                                  '  more 'minimalist' approach to getting
  25.                                  '  the decision on crowded screens.
  26.                                  '
  27.                                  '  Author:  Kirk Woodward d/b/a
  28.                                  '           People Centered Programs
  29.                                  '           PO Box 610171
  30.                                  '           Dallas, TX 75261-0171
  31.                                  '           Voice:  817/488-4940
  32.                                  '             FAX:  817/488-4945
  33.                                  '      CompuServe:  70146,51
  34.                                  '
  35.                                  '
  36.  
  37. CLS
  38.  
  39. PRINT , "Enter the line and column you want the"
  40. PRINT , "decision grid to be displayed on.  Separate"
  41. PRINT , "the values with a comma:  Example:    10,15"
  42. PRINT , "will put the grid on the 10th line, at the"
  43. PRINT , "15th column.  "
  44. PRINT
  45. PRINT , ; : INPUT dLine, dCol
  46. PRINT
  47. LOCATE , , 1, 1, 8: PRINT , "<H>orizontal  or  <V>ertical  display? ";
  48.  
  49.  
  50. DO
  51.  
  52.     do$ = UCASE$(INPUT$(1))
  53.  
  54.     COLOR 0, 7
  55.  
  56.     SELECT CASE do$
  57.  
  58.         CASE "H"
  59.             CALL YNQhorizontal(dLine, dCol, decision$)
  60.  
  61.         CASE "V"
  62.             CALL YNQvertical(dLine, dCol, decision$)
  63.  
  64.         CASE ELSE
  65.             SOUND 800, 3: BEEP
  66.             do$ = ""
  67.  
  68.     END SELECT
  69.  
  70. LOOP UNTIL do$ = "H" OR do$ = "V"
  71.  
  72. COLOR 7, 0
  73.  
  74. CLS
  75.  
  76. LOCATE 3, 10: PRINT "    "; decision$; " was returned to calling program. (Any key continues.) "
  77. PRINT
  78.  
  79. SLEEP
  80.  
  81.  
  82.  
  83. PRINT , "If you find these routines helpful or instructive . . ."
  84. PRINT
  85. PRINT , "  Register by sending $10 to:"
  86. PRINT
  87. PRINT , "     People Centered Programs"
  88. PRINT , "     PO Box 610171"
  89. PRINT , "     Dallas, TX 75261-0171"
  90. PRINT , "     CompuServe:  70146,51"
  91. PRINT
  92. PRINT "  Your registration puts you 'in loop' in the exciting field of Shareware"
  93. PRINT "  and encourages the flow of solid useful computer software that you"
  94. PRINT "  can 'try before you buy.'"
  95. PRINT
  96. PRINT , "Re-start this demo by"
  97. PRINT , "holding down the Shift key while"
  98. PRINT , "tapping the F5 key twice.  "
  99. PRINT
  100. PRINT , "Touch any key to see"
  101. PRINT , "the source code."
  102.  
  103.  
  104. END               '   re-start the demo with:   Shift+F5
  105.  
  106. SUB YNQhorizontal (dLine, dCol, decision$)
  107.  
  108. '   dLine and dCol are the upper left corner of the grid, it is drawn down
  109. '   and to the right of this point
  110. '
  111. '   decision$ is used to return the operator's decision to the program.
  112.  
  113. '  This SUB responds to left and right arrow keys, down arrow key,
  114. '  the enter key and
  115. '  touching a    Y, N or Q
  116.  
  117. '  if the line and column values requested will crash the SUB,
  118. '  we change them here.  The box needs five lines and 28 columns
  119.  
  120.     IF dLine < 5 THEN dLine = 1
  121.     IF dLine > 21 THEN dLine = 21
  122.     IF dCol < 1 THEN dCol = 1
  123.     IF dCol > 51 THEN dCol = 51
  124.  
  125. '  turn off the cursor
  126.  
  127.     LOCATE , , 0
  128.  
  129.  
  130. '  Now draw the frame...
  131.  
  132.     DIM L$(1 TO 5)
  133.     COLOR 15, 0
  134.  
  135.     '  here are different box styles.  Change your default  design by use
  136.     '  of the remark symbol - the ' (apostrophy)
  137.     '
  138.  
  139.      'L$(1) = "┌───────────────────────╖    "
  140.      'L$(2) = "│∙╔═══╤═══╤═══╤═══╤═══╕∙║    "
  141.      'L$(3) = "│ ║   │ Y │ N │ Q │   │ ║    "
  142.      'L$(4) = "│∙╙───┴───┴───┴───┴───┘∙║    "
  143.      'L$(5) = "╘═══════════════════════╝    "
  144.  
  145.      '
  146.      '  the following is the default grid - the most elaborate of the
  147.      '  series.  If you want to use any of the others the placement
  148.      '  of the arrows and the movement of the highlighted selections
  149.      '  will need to be adjusted a few spaces in the SELECT CASE block
  150.      '  below.
  151.      '
  152.      '  Remove the   '   marks from in front of the grid you want to use
  153.      '  put   '   marks in front of this one and then run, making notes as
  154.      '  to how many spaces left or right each feature needs to move.
  155.      '
  156.      L$(1) = "┌───────────────────────────╖"
  157.      L$(2) = "│∙╔═══╕╔═══╕╔═══╕╔═══╕╔═══╕∙║"
  158.      L$(3) = "│ ║   │║ Y │║ N │║ Q │║   │ ║"      '  maxed out
  159.      L$(4) = "│∙╙───┘╙───┘╙───┘╙───┘╙───┘∙║"
  160.      L$(5) = "╘═══════════════════════════╝"
  161.  
  162.     'l$(1) = ""
  163.     'l$(2) = "╔═══╤═══╤═══╤═══╤═══╗"
  164.     'l$(3) = "║   │ Y │ N │ Q │   ║"
  165.     'l$(4) = "╚═══╧═══╧═══╧═══╧═══╝"
  166.     'l$(5) =""
  167.  
  168.     'l$(1) = ""
  169.     'l$(2) = "┌───┬───┬───┬───┬───┐"
  170.     'l$(3) = "│   │ Y │ N │ Q │   │"
  171.     'l$(4) = "└───┴───┴───┴───┴───┘"
  172.     'l$(5) = ""
  173.  
  174.     'l$(1) = ""
  175.     'l$(2) = "╔═╦═╦═╕"
  176.     'l$(3) = "║Y║N║Q│"        '  minimal, drops arrows too.
  177.     'l$(4) = "╙─╨─╨─┘"        '  need to rework much of rest of sub.
  178.     'l$(5) = ""                                           
  179.  
  180.     'l$(1) = ""
  181.     'l$(2) = "┌───┬───╥───╥───╥───┐"
  182.     'l$(3) = "│   │ Y ║ N ║ Q ║   │"
  183.     'l$(4) = "└───╘═══╩═══╩═══╩───┘"
  184.     'l$(5) =""
  185.                     
  186.  
  187.     'l$(1) =""
  188.     'l$(2) = "┌───╥───╥───╥───╥───╖"
  189.     'l$(3) = "│   ║ Y ║ N ║ Q ║   ║"
  190.     'l$(4) = "╘═══╩═══╩═══╩═══╩═══╝"
  191.     'l$(5) = ""                                                        2
  192.  
  193.     dLine = dLine - 1   ' adjusts the line where the box starts to print
  194.                         ' . . . one line above the letters
  195.  
  196.     '   If you have access to MS PDS 7.1, then this is the place where
  197.     '   you would want to use that portion of the User Interface that
  198.     '   captures the portion of the screen you are about to overwrite,
  199.     '   then restore it before leaving the SUB.  Three items are needed:
  200.     '
  201.     '   1.  getBackground SUB from WINDOWS.BAS
  202.     '   2.  putBackground SUB from WINDOWS.BAS
  203.     '   3.  uiasm.qlb or lib library from \bc7\lib
  204.     '       (Assuming you used MicroSoft's default names when installing)
  205.     '
  206.     '   -- Those two SUBS call an assembly language routine
  207.     '      contained in \BC7\LIB subdirectory, (uiasm.lib) which needs to be
  208.     '      loaded at startup with the command:
  209.     '
  210.     '       qbx /runProgramName /l\bc7\lib\uiasm
  211.     '                                              you don't need to
  212.     '                                              type a file extension
  213.     '                                              for uiasm.  QBX will load
  214.     '                                              the right version (.QLB
  215.     '                                              is for use in QBX, .LIB
  216.     '                                              is called by compiler.
  217.     '
  218.  
  219.     FOR d = 1 TO 5
  220.         LOCATE dLine + d, dCol: PRINT L$(d);     ' print a line of the grid
  221.         IF d = 3 THEN dataLine = CSRLIN          ' remember the line the Y N Q
  222.                                                  ' and the arrows will go on.
  223.     NEXT d
  224.  
  225.     COLOR 16, 7        ' we blink arrows and default till a key is pressed.
  226.  
  227.     LOCATE dataLine, dCol + 3: PRINT CHR$(27);            ' a left arrow
  228.     LOCATE dataLine, dCol + 25: PRINT CHR$(26);           ' a right arrow
  229.  
  230.     '  the default decision is " Y " (Yes)
  231.     '  it and the arrows flash to attract operator's attention, quits fla2shing
  232.     '  if an acceptable key is pressed or an arrow key is pressed
  233.  
  234.     LOCATE dataLine, dCol + 8: PRINT " Y ";
  235.  
  236.     highlightedBox = 1        ' the default selection, "Y"
  237.  
  238. getChoice:
  239.  
  240.     k$ = ""
  241.  
  242.     DO
  243.         k$ = INKEY$                      ' capture operator's key stroke(s)
  244.     LOOP UNTIL k$ > ""
  245.  
  246.     ' no need to flash the arrows any more
  247.  
  248.     COLOR 0, 7
  249.     LOCATE dataLine, dCol + 3: PRINT CHR$(27);            ' a left arrow
  250.     LOCATE dataLine, dCol + 25: PRINT CHR$(26);           ' a right arrow
  251.     COLOR 7, 0
  252.  
  253.  
  254. acceptDownArrowReturnPoint:
  255.  
  256. '  if the operator presses the down arrow
  257. '  we treat it as a selection, the ENTER key
  258.  
  259.  
  260.     SELECT CASE LEN(k$)
  261.  
  262.         CASE 1        ' a regular key was touched
  263.  
  264.             SELECT CASE UCASE$(k$)
  265.  
  266.                 CASE CHR$(13)           '  operator has pressed ENTER key
  267.                     IF highlightedBox = 1 THEN decision$ = "Y"
  268.                     IF highlightedBox = 2 THEN decision$ = "N"
  269.                     IF highlightedBox = 3 THEN decision$ = "Q"
  270.  
  271.                 CASE "Y"
  272.                     decision$ = "Y"
  273.                 CASE "N"
  274.                     decision$ = "N"
  275.                 CASE "Q"
  276.                     decision$ = "Q"
  277.                 CASE ELSE
  278.                     '  we ignore all other keys
  279.                     SOUND 2200, 1
  280.                     GOTO getChoice:
  281.             END SELECT
  282.  
  283.         CASE 2        '  an 'extended' key was touched
  284.  
  285.             SELECT CASE ASC(RIGHT$(k$, 1))        ' get 'meaningful' character
  286.                 
  287.                 CASE 77           ' right arrow was touched
  288.                     highlightedBox = highlightedBox + 1
  289.                     IF highlightedBox > 3 THEN highlightedBox = 1
  290.  
  291.                 CASE 75           '  left arrow was touched
  292.                     highlightedBox = highlightedBox - 1
  293.                     IF highlightedBox < 1 THEN highlightedBox = 3
  294.  
  295.                 CASE 80           ' down arrow was touched
  296.                     '  operators often equate the down arrow with selection
  297.                     '  in a situation like this so we accept it as though
  298.                     '  the enter key was pressed.
  299.                     k$ = CHR$(13)
  300.                     GOTO acceptDownArrowReturnPoint:
  301.  
  302.                 CASE ELSE
  303.                     '  ignore all others
  304.                     SOUND 2300, 1
  305.                     GOTO getChoice:
  306.  
  307.             END SELECT
  308.  
  309.             SELECT CASE highlightedBox      ' the highlighted letter 'moves.'
  310.                 CASE 1
  311.                     LOCATE dataLine, dCol + 8: COLOR 0, 7: PRINT " Y ";
  312.                     LOCATE dataLine, dCol + 13: COLOR 7, 0: PRINT " N ";
  313.                     LOCATE dataLine, dCol + 18: COLOR 7, 0: PRINT " Q ";
  314.  
  315.                 CASE 2
  316.                     LOCATE dataLine, dCol + 8: COLOR 7, 0: PRINT " Y ";
  317.                     LOCATE dataLine, dCol + 13: COLOR 0, 7: PRINT " N ";
  318.                     LOCATE dataLine, dCol + 18: COLOR 7, 0: PRINT " Q ";
  319.  
  320.                 CASE 3
  321.                     LOCATE dataLine, dCol + 8: COLOR 7, 0: PRINT " Y ";
  322.                     LOCATE dataLine, dCol + 13: COLOR 7, 0: PRINT " N ";
  323.                     LOCATE dataLine, dCol + 18: COLOR 0, 7: PRINT " Q ";
  324.  
  325.             END SELECT
  326.  
  327.             GOTO getChoice:         '  the highlight has been moved to one
  328.                                     '  of the three options, we go back to
  329.                                     '  the INKEY$ routine to see if the
  330.                                     '  operator wants to select it.
  331.  
  332.     END SELECT
  333.  
  334. END SUB
  335.  
  336. SUB YNQvertical (dLine, dCol, decision$)
  337.  
  338. '   dLine and dCol are the upper left corner of the grid
  339. '   the grid is drawn down and to the right of this point
  340. '
  341. '   decision$ is used to return the operator's decision to program.
  342.  
  343. '  This SUB responds to left and right arrow keys, the enter key and
  344. '  touching a    Y, N or Q
  345.  
  346. '  if the line and column values requested will crash the SUB,
  347. '  we change them here.  The box needs 17 lines and 24 columns
  348.  
  349.     IF dLine < 1 THEN dLine = 1
  350.     IF dLine > 8 THEN dLine = 8
  351.     IF dCol < 1 THEN dCol = 1
  352.     IF dCol > 71 THEN dCol = 71
  353.  
  354. '  turn off the cursor
  355.  
  356.     LOCATE , , 0
  357.  
  358.  
  359. '  Now draw the frame...
  360.  
  361.     DIM L$(1 TO 17)
  362.     COLOR 15, 0
  363.  
  364.     '  here are different grid styles.  Change your default  design by use
  365.     '  of the remark symbol - the ' (apostrophy)
  366.     '
  367.     '  Only the first '3d' matrix actually needs seventeen lines to print.
  368.     '  They are blank in the other to maintain consistancy and could
  369.     '  be used for other data, or, the display portion could be reworked
  370.     '  for the exact number of lines needed - one line for each array element
  371.     '
  372.     '  If you would like to have both designs continiously available, then
  373.     '  you would need to pass another parameter:
  374.     '
  375.     '   Example: CALL YNQvertical (dLine, dCol, gridType, decision$)
  376.     '
  377.     '       Where:  gridType would be 1 or 2, depending on your choice
  378.     '
  379.     '   the l$() array would also need to become a two dimension array.
  380.     '
  381.     '   Example:   DIM l$(2, 17)    (Two dimensions with 17 elements each.)
  382.     '
  383.     '   The assignments to the array would be slightly different as well . . .
  384.     '
  385.     '              l$(1,1) = "┌───────╖"
  386.     '              l$(1,2) = "│∙╔═══╕∙║"
  387.     '              l$(1,3) = "│ ║   │ ║"
  388.     '              l$(1,4) = "│ ╙───┘ ║"
  389.     '              .
  390.     '              .
  391.     '              .    (and so on for the first design)
  392.     '
  393.     '
  394.     '
  395.     '               l$(2,1) = ""
  396.     '               l$(2,2) = "╔═══╕"
  397.     '               l$(2,3) = "║   │"
  398.     '               l$(2,4) = "╙───┘"
  399.     '               .
  400.     '               .
  401.     '               .
  402.     '               .    (and so on for the second design)
  403.     '
  404.     '  Within the 'display loop' you would then have the line:
  405.     '
  406.     '              FOR d = 1 TO 17
  407.     '                 LOCATE dLine + d, dCol: PRINT l$(gridType,d);
  408.     '              NEXT d
  409.     '
  410.  
  411.  
  412.  
  413.      L$(1) = "┌───────╖"
  414.      L$(2) = "│∙╔═══╕∙║"
  415.      L$(3) = "│ ║   │ ║"
  416.      L$(4) = "│ ╙───┘ ║"
  417.      L$(5) = "│ ╔═══╕ ║"
  418.      L$(6) = "│ ║ Y │ ║"
  419.      L$(7) = "│ ╙───┘ ║"
  420.      L$(8) = "│ ╔═══╕ ║"
  421.      L$(9) = "│ ║ N │ ║"
  422.      L$(10) = "│ ╙───┘ ║"
  423.      L$(11) = "│ ╔═══╕ ║"
  424.      L$(12) = "│ ║ Q │ ║"
  425.      L$(13) = "│ ╙───┘ ║"
  426.      L$(14) = "│ ╔═══╕ ║"
  427.      L$(15) = "│ ║   │ ║"
  428.      L$(16) = "│∙╙───┘∙║"
  429.      L$(17) = "╘═══════╝"
  430.  
  431.      'l$(1) = ""
  432.      'l$(2) = "╔═══╕"
  433.      'l$(3) = "║   │"
  434.      'l$(4) = "╙───┘"
  435.      'l$(5) = "╔═══╕"
  436.      'l$(6) = "║ Y │"
  437.      'l$(7) = "╙───┘"
  438.      'l$(8) = "╔═══╕"
  439.      'l$(9) = "║ N │"
  440.      'l$(10) = "╙───┘"
  441.      'l$(11) = "╔═══╕"
  442.      'l$(12) = "║ Q │"
  443.      'l$(13) = "╙───┘"
  444.      'l$(14) = "╔═══╕"
  445.      'l$(15) = "║   │"
  446.      'l$(16) = "╙───┘"
  447.      'l$(17) = ""
  448.  
  449.      'l$(5) = "╔═══╕"
  450.      'l$(6) = "║ Y │"
  451.      'l$(7) = "╙───┘"                ' drops arrows
  452.      'l$(8) = "╔═══╕"
  453.      'l$(9) = "║ N │"
  454.      'l$(10) = "╙───┘"
  455.      'l$(11) = "╔═══╕"
  456.      'l$(12) = "║ Q │"
  457.      'l$(13) = "╙───┘"
  458.  
  459.      'l$(1) = "╔═╕"
  460.      'l$(2) = "║Y│"
  461.      'l$(3) = "╠═╡"
  462.      'l$(4) = "║N│"     ' this is smallest possible presentation - drops
  463.      'l$(5) = "╠═╡"     '  arrows too
  464.      'l$(6) = "║Q│"
  465.      'l$(7) = "╙─┘"
  466.  
  467.  
  468.  
  469.  
  470.  
  471.     '   If you have access to MS PDS 7.1, then this is the place where
  472.     '   you would want to use that portion of the User Interface that
  473.     '   captures the portion of the screen you are about to overwrite,
  474.     '   then restore it before leaving the SUB.  Three items are needed:
  475.     '
  476.     '   1.  getBackground SUB from WINDOWS.BAS
  477.     '   2.  putBackground SUB from WINDOWS.BAS
  478.     '   3.  uiasm.qlb/lib library from \bc7\lib
  479.     '
  480.     '   -- Those two SUBS call an assembly language routine
  481.     '      contained in \BC7\LIB subdirectory, (uiasm.lib) which needs to be
  482.     '      loaded at startup with the command:
  483.     '
  484.     '       qbx /runProgramName /l\bc7\lib\uiasm
  485.     '                                              you don't need to
  486.     '                                              type a file extension
  487.     '                                              for uiasm.  QBX will load
  488.     '                                              the right version (.QLB
  489.     '                                              is for use in QBX, .LIB
  490.     '                                              is called by compiler.
  491.     '
  492.     dLine = dLine - 1   ' adjusts the line where the box starts to print
  493.                         ' to accomodate the FOR/NEXT loop incrementing
  494.  
  495.     FOR d = 1 TO 17
  496.         LOCATE dLine + d, dCol: PRINT L$(d);
  497.     NEXT d
  498.  
  499.     COLOR 16, 7
  500.  
  501.     '  display direction arrows within the grid
  502.  
  503.     LOCATE dLine + 3, dCol + 4: PRINT CHR$(24);          ' an up arrow
  504.     LOCATE dLine + 15, dCol + 4: PRINT CHR$(25);         ' a down arrow
  505.  
  506.     '  the default decision is " Y " (Yes)
  507.     '  it flashes to attract operator's attention, quits flashing
  508.     '  if an acceptable key is pressed or an arrow key is pressed
  509.  
  510.     LOCATE dLine + 6, dCol + 3: PRINT " Y ";
  511.  
  512.     COLOR 7, 0
  513.  
  514.     highlightedBox = 1        ' the default selection, "Y"
  515.  
  516. getKeyChoice:
  517.  
  518.     k$ = ""
  519.  
  520.     DO
  521.         k$ = INKEY$                      ' capture operator's key stroke(s)
  522.     LOOP UNTIL k$ > ""
  523.  
  524.     SELECT CASE LEN(k$)
  525.  
  526.         CASE 1        ' a regular key was touched
  527.  
  528.             SELECT CASE UCASE$(k$)
  529.  
  530.                 CASE CHR$(13)           '  operator has pressed ENTER key
  531.                     IF highlightedBox = 1 THEN decision$ = "Y"
  532.                     IF highlightedBox = 2 THEN decision$ = "N"
  533.                     IF highlightedBox = 3 THEN decision$ = "Q"
  534.  
  535.                 CASE "Y"
  536.                     decision$ = "Y"
  537.                 CASE "N"
  538.                     decision$ = "N"
  539.                 CASE "Q"
  540.                     decision$ = "Q"
  541.                 CASE ELSE
  542.                     '  we ignore all other keys
  543.                     SOUND 2200, 1
  544.                     GOTO getKeyChoice:
  545.             END SELECT
  546.  
  547.         CASE 2        '  an 'extended' key was touched
  548.  
  549.             ' stop arrows from blinking
  550.  
  551.             COLOR 0, 7
  552.             LOCATE dLine + 3, dCol + 4: PRINT CHR$(24);          ' an up arrow
  553.             LOCATE dLine + 15, dCol + 4: PRINT CHR$(25);         ' a down arrow
  554.             COLOR 7, 0
  555.  
  556.  
  557.             SELECT CASE ASC(RIGHT$(k$, 1))   ' get 'meaningful' character
  558.  
  559.                 CASE 80           ' down  arrow was touched
  560.                     highlightedBox = highlightedBox + 1
  561.                     IF highlightedBox > 3 THEN highlightedBox = 1
  562.                 CASE 72           '  up   arrow was touched
  563.                     highlightedBox = highlightedBox - 1
  564.                     IF highlightedBox < 1 THEN highlightedBox = 3
  565.  
  566.                 CASE ELSE
  567.                     '  ignore all others
  568.                     SOUND 2300, 1
  569.                     GOTO getKeyChoice:
  570.  
  571.             END SELECT
  572.  
  573.             SELECT CASE highlightedBox       '  now 'move' the highlight
  574.                 CASE 1
  575.                     LOCATE dLine + 6, dCol + 3: COLOR 0, 7: PRINT " Y ";
  576.                     LOCATE dLine + 9, dCol + 3: COLOR 7, 0: PRINT " N ";
  577.                     LOCATE dLine + 12, dCol + 3: COLOR 7, 0: PRINT " Q ";
  578.  
  579.                 CASE 2
  580.                     LOCATE dLine + 6, dCol + 3: COLOR 7, 0: PRINT " Y ";
  581.                     LOCATE dLine + 9, dCol + 3: COLOR 0, 7: PRINT " N ";
  582.                     LOCATE dLine + 12, dCol + 3: COLOR 7, 0: PRINT " Q ";
  583.  
  584.                 CASE 3
  585.                     LOCATE dLine + 6, dCol + 3: COLOR 7, 0: PRINT " Y ";
  586.                     LOCATE dLine + 9, dCol + 3: COLOR 7, 0: PRINT " N ";
  587.                     LOCATE dLine + 12, dCol + 3: COLOR 0, 7: PRINT " Q ";
  588.  
  589.             END SELECT
  590.  
  591.             GOTO getKeyChoice:
  592.  
  593.     END SELECT
  594.  
  595. END SUB
  596.  
  597.